package TutorialsText;

public class AnimalDemo {
    public static void main(String[] args) {
        Animal a = new Cat();
        a.setName("加菲");
        a.setAge(18);
        System.out.println(a.getName()+","+a.getAge());
         a.eat();

         a = new Cat("加菲",20);
        System.out.println(a.getName()+","+a.getAge());
         a.eat();
    }
}
